<?php
/**
 * trading_contract 数据表模型
 * @author  yuliang <yuliang@pvc123.com>
 */

namespace models;

class TradingContractModel extends C_Model {
    //合同状态；合同状态(0:未成交,1:已成交)

    const STATUS_NO_TRADING=0;
    const STATUS_IS_TRADING=1;

    //合同进度(0:合同生成,1:买方付款,2:卖方收款,3:卖方发货,4:买方收货验货)
    const PROGRESS_CONTRACT_GREATE=0;//合同生成
    const PROGRESS_BUYER_MONEY_PAYED=1;//买方付款
    const PROGRESS_SELLER_MONEY_COLLECTION=2;//卖方收款

    const PROGRESS_SELLER_GOODS_DELIVERY=3;//卖方发货
    const PROGRESS_BUYER_GOODS_RECEIPT=4;//买方收货验货


    public function __construct() {

        //创建model对象并初始化数据表名称
        parent::__construct('trading_contract');

        //设置表数据表主键，默认为id
        $this->setPrimaryKey('id');
		$this->autoPrimary = true;
        

        

    }
} 
